//
//  DZNEmptyDataSet+Ex.swift
//  XXSync
//
//  Created by Rdxer on 2017/8/5.
//  Copyright © 2017年 Rdxer. All rights reserved.
//

import UIKit
import DZNEmptyDataSet

@objc
public protocol XXEmptyDataSet:DZNEmptyDataSetSource,DZNEmptyDataSetDelegate{

}

public extension XXEmptyDataSet where Self: UIScrollView{
    func prepareEmptyDataSet(){
        self.emptyDataSetSource = self
        self.emptyDataSetDelegate = self
    }
}

public extension XXEmptyDataSet where Self: UIViewController{
    func prepareEmptyDataSet(scrollView:UIScrollView){
        scrollView.emptyDataSetSource = self
        scrollView.emptyDataSetDelegate = self
    }
}

//public extension XXEmptyDataSet where Self: UITableViewController{
//    func prepareEmptyDataSet( scrollView:UIScrollView? =  nil){
//        var scrollView = scrollView
//        scrollView = scrollView == nil ? tableView : scrollView
//        scrollView?.emptyDataSetSource = self
//        scrollView?.emptyDataSetDelegate = self
//    }
//}

